<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/theme/jquery.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/layerui/layer.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/layerui/layer.ext.js"></script>
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/skin/css/mobilecss/charge.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/skin/css/mobilecss/main.css">
    <style type="text/css">
        body {
            padding-bottom: 40px;
            
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
</head>
<body>
<form action="" method="post" class="definewidth m20">
<input type="hidden" name="id" value="{$user.id}" />
<div class="container">
        <p style="font-size: 0.9rem" id="addTitle">收款信息${bankCard.bankName}</p>
        <div style="border: 1px solid #636363">
            <span style="border:none;padding: 0.5rem;">开户机构</span>
            <select id="bankName" name="bankName"  style="border: none;width: 60%;background-color: #FFFFFF">
	            <option value="1002" ${bankCard.bankName==1002?'selected':'' }>工商银行 </option>
	            <option value="1005" ${bankCard.bankName==1005?'selected':'' }>农业银行 </option>
	            <option value="1026" ${bankCard.bankName==1026?'selected':'' }>中国银行 </option>
	            <option value="1003" ${bankCard.bankName==1003?'selected':'' }>建设银行</option>
	            <option value="1001" ${bankCard.bankName==1001?'selected':'' }>招商银行 </option>
	            <option value="1066" ${bankCard.bankName==1066?'selected':'' }>邮储银行 </option>
	            <option value="1020" ${bankCard.bankName==1020?'selected':'' }>交通银行 </option>
	            <option value="1004" ${bankCard.bankName==1004?'selected':'' }>浦发银行 </option>
	            <option value="1006" ${bankCard.bankName==1006?'selected':'' }>民生银行 </option>
	            <option value="1009" ${bankCard.bankName==1009?'selected':'' }>兴业银行 </option>
	            <option value="1010" ${bankCard.bankName==1010?'selected':'' }>平安银行 </option>
	            <option value="1021" ${bankCard.bankName==1021?'selected':'' }>中信银行 </option>
	            <option value="1025" ${bankCard.bankName==1025?'selected':'' }>华夏银行 </option>
	            <option value="1027" ${bankCard.bankName==1027?'selected':'' }>广发银行 </option>
	            <option value="1022" ${bankCard.bankName==1022?'selected':'' }>光大银行 </option>
	            <option value="1032" ${bankCard.bankName==1032?'selected':'' }>北京银行 </option>
	            <option value="1056" ${bankCard.bankName==1056?'selected':'' }>宁波银行 </option>
	            <option value="1" ${bankCard.bankName==1?'selected':'' }>支付宝 </option>
	            <option value="2" ${bankCard.bankName==1026?'selected':'' }>微信 </option>
	            <option value="0" ${bankCard.bankName==0?'selected':'' }>其他 </option>
            </select>
            <%-- <input type="text" id="bankName" name="bankName" value="${bankCard.bankName}" placeholder="请输入开户机构名称如：支付宝"
             style="border: none;width: 60%;background-color: #FFFFFF"> --%>
        </div>
        <div style="border: 1px solid #636363">
            <span style="border:none;padding: 0.5rem;">开户账号</span>
            <input type="text" id="bankUserNo" name="bankUserNo" value="${bankCard.bankUserNo}" placeholder="请输入账号如：支付宝账号"  style="border: none;width: 60%">
        </div>
        <div style="border: 1px solid #636363">
            <span style="border:none;padding: 0.5rem;">开户人</span>
            <input type="text" id="bankUserName" name="bankUserName" value="${bankCard.bankUserName}" placeholder="请输入开户人如：张三"  style="border: none;width: 60%">
        </div>
        <div style="border: 0px solid #636363">
            	（请认真核对好收款信息，确保无误，银行卡可直接提现！）
        </div>
        <div style="margin-top: 3rem">
            <button type="button" style="width: 100%" id="saveBank" >确认添加</button>
        </div>
    </div>
</form>
</body>
<script type="text/javascript">
    $(function () {       
		$('#saveBank').click(function(){
			if($("#bankName").val()==""){
				layer.alert("请输入开户行名称 ");
				return;
			}
			if($("#bankUserNo").val()==""){
				layer.alert("请输入开会行卡号");
				return;
			}
			if($("#bankUserName").val()==""){
				layer.alert("请输入开户人名称");
				return;
			}
			$.post("${pageContext.request.contextPath}/admin/update_bank_save_mobile.html",
		       {"bankName":$("#bankName").val(),"bankUserNo":$("#bankUserNo").val(),"bankUserName":$("#bankUserName").val()},
		       function(data){
	            	var json = eval("("+data+")");
					if(json.statusCode =='200'){
						layer.alert(json.message);
					}else{
						layer.alert(json.message);
					}
		      });
		 });
		
    });
    function closewind(){
    	top.window.location.href="${pageContext.request.contextPath}/admin/logout.html";
    }
    
    
</script>
</html>